package myky.com.doctorapp.contract;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;
import myky.com.doctorapp.entity.SearchHistoryItem;
import myky.com.doctorapp.base.BaseEntity;
import myky.com.doctorapp.base.BaseView;

public interface SearchContract {
    interface Model {

        Observable<BaseEntity<ArrayList<SearchHistoryItem>>> findAllSearchHistory(String version, String searchScope, String customId);

        Observable<BaseEntity<Object>> deleteSingleHistoryById(int id, String version, String customId);

        Observable<BaseEntity<Object>> deleteAllHistoryById(String version, String customId);

        Observable<BaseEntity<List<String>>> findKeyWordByInput(String version, String searchType, String input);

    }

    interface View extends BaseView<List<SearchHistoryItem>> {
        void showAllHistory(ArrayList<SearchHistoryItem> allHistory);

        void deleteSingleHistorySucced(int postion);

        void deleteAllHistorySucced();

        void showReleaedKeyWord(List<String> keyWord);
    }

    interface Presenter {

        void getSearchHistory(String version, String searchScope, String customId);

        void deleteSingleHistoryById(int id, String version, String customId,int postion);

        void deleteAllHistoryByUserId(String version, String customId);

        void findKeyWordByInput(String version, String searchType, String input);
    }
}
